package com.bit.forum.dao;

import com.bit.forum.model.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    int insertSelective (Long id);

    /**
     * @Author suhzou
     *查询所有帖子列表
     * @return article
     */
    List<Article> selectAll();
    /**
     * @Author suhzou
     *查询某个板块帖子列表
     * @return article
     */
    List<Article> selectAllByBoardId(@Param("boardId") Long boardId);

    /**
     * @Author suhzou
     * 查询帖子详情
     * @return article
     */
    Article selectDetailById(@Param("id") Long id);

}